{extend name="public/base" /}
{block name="header_title"}VIP会员列表{/block}
{block name="main"}
<main class="lyear-layout-content">

    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-toolbar clearfix">
                        <form class="pull-right search-bar" method="get" action="users.html" role="form">
                            <div class="input-group">
                                <input type="text" class="form-control keyword" value="{$keyword}" name="key" placeholder="请输入要查询的手机号">
                                <div class="input-group-btn">
                                    <button class="btn btn-default" id="search-btn" type="submit"><span>查询</span></button>
                                </div>
                            </div>
                        </form>
                        <div class="toolbar-btn-action">
                            <a href="reg.html" class="btn btn-primary m-r-5"><i class="mdi mdi-plus"></i> 新增</a>
                        </div>
                    </div>
                    <div class="card-body">

                        <div class="table-responsive">
                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>姓名</th>
                                    <th>手机号</th>
                                    <th>余额</th>
                                    <th>开户时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {foreach $user_list as $list}
                                <tr>
                                    <td class="user-id">{$list.id}</td>
                                    <td class="user-name">{$list.name}</td>
                                    <td class="user-mobile">{$list.mobile}</td>
                                    <td class="user-cost">{$list.total_cost==''?0:$list.total_cost}</td>
                                    <td>{$list.create_time|date='Y-m-d H:i:s'}</td>
                                    <td>
                                        <div class="btn-group">
                                            <a href="#" class="btn btn-xs btn-default btn-edit" title="编辑" data-toggle="modal" data-target="#myModal_edit"><i class="mdi mdi-pencil"></i></a>
                                            <a href="show.html?m={$list.mobile}" class="btn btn-xs btn-default" title="查看" data-original-title="查看"><i class="mdi mdi-eye"></i></a>
                                            <a href="#" class="btn btn-xs btn-default btn-payout" title="消费" data-toggle="modal" data-target="#myModal_payout"><i class="mdi mdi-currency-cny"></i></a>
                                        </div>
                                    </td>
                                </tr>
                                {/foreach}
                                </tbody>
                            </table>
                        </div>

                        <div class="page">
                            <input type="hidden" id="count" value="{$count}">
                            <input type="hidden" id="sort" value="{$sort}">
                            <input type="hidden" id="curr" value="{$curr}">
                            <div id="page-box"></div>
                        </div>

                        <!--模态框-->
                        <div class="modal fade" id="myModal_edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                        <h4 class="modal-title" id="myModalLabel_edit">会员修改</h4>
                                    </div>
                                    <div class="modal-body">
                                        <div class="form-group">
                                            <label for="example-nf-mobile">手机号</label>
                                            <input class="form-control mobile" type="text" disabled id="example-nf-mobile" name="example-nf-mobile" placeholder="请输入手机号">
                                        </div>
                                        <div class="form-group">
                                            <label for="example-nf-name">姓名</label>
                                            <input class="form-control name" type="text" id="example-nf-name" name="example-nf-name" placeholder="请输入姓名">
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                        <button type="button" class="btn btn-primary sureTap" data-id="">点击保存</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="modal fade" id="myModal_payout" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                        <h4 class="modal-title" id="myModalLabel_payout">会员消费</h4>
                                    </div>
                                    <div class="modal-body">
                                        <div class="form-group">
                                            <label for="payout-mobile">手机号</label>
                                            <input class="form-control mobile" type="text" readonly id="payout-mobile" name="payout-mobile">
                                        </div>
                                        <div class="form-group">
                                            <label for="payout-name">姓名</label>
                                            <input class="form-control name" type="text" readonly id="payout-name" name="payout-name">
                                        </div>
                                        <div class="form-group">
                                            <label for="payout-total_cost">余额</label>
                                            <input class="form-control total_cost" type="text" readonly id="payout-total_cost" name="payout-total_cost">
                                        </div>
                                        <div class="form-group">
                                            <label for="payout-cost">消费金额</label>
                                            <input class="form-control cost" type="text" id="payout-cost" name="payout-cost" placeholder="请输入消费金额">
                                        </div>
                                        <div class="form-group">
                                            <label for="payout-result_cost">消费后余额</label>
                                            <input class="form-control result_cost" type="text" readonly id="payout-result_cost" name="payout-result_cost" placeholder="">
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                        <button type="button" class="btn btn-primary payoutTap" data-id="">点击结算</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</main>
{/block}
{block name="js"}
<script type="text/javascript" src="__js__/base.64.js"></script>
<script src="__js__/view/user/index.js"></script>
{/block}